package com.yuju.order.enums;
public enum SourceEnum {
	 	SANKE((byte)1,"散客"),
	    MEMBER((byte)2, "会员"),
		XIEYIDANWEI((byte)3,"协议单位"),
		ZHONGJIE((byte)4, "中介"),
		OWNER((byte)5, "业主"),
		EMPLOYEE((byte)6, "员工");
	    private byte value;
	    private String name;

	    SourceEnum(byte value, String name) {
	        this.name = name;
	        this.value = value;
	    }

	    public String getName() {
	        return name;
	    }

	    public byte getValue() {
	        return value;
	    }
	    public  static String getNameByValue(byte value){
	    	for(SourceEnum e : SourceEnum.values()){
	    		if(e.getValue()== value){
	    			return e.getName();
	    		}
	    	}
			return "未知枚举";
	    }
	    
}
